import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'

export const MENU_ROUTER: RouteRecordRaw[] = [
  {
    path: '/',
    meta:{
      title:'首页'
    },
    component: () => import('../views/home/index.vue')
  },
  {
    path: '/user',
     meta:{
      title:'用户列表'
    },
    component: () => import('../views/user/index.vue')
  },
  {
    path: '/my',
     meta:{
      title:'我的'
    },
    component: () => import('../views/my/index.vue')
  }
]

const LIST_ROUTER: RouteRecordRaw[] = [
  {
    path: '/',
    component: () => import('../views/layout/index.vue'),
    children:MENU_ROUTER
  }
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: LIST_ROUTER
})

export default router
